package cn.zswltech.gruul.common.dal.dao;

import cn.zswltech.gruul.common.dal.tkmybatis.IMapper;
import cn.zswltech.gruul.common.entity.RoleMenuFunctionDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface RoleMenuFunctionDOMapper extends IMapper<RoleMenuFunctionDO> {

    List<Long> queryRoleIdByFunctionId(Long functionId);

    List<Long> queryMenusByRule(Long roleId);

    List<Long> queryFuncsByRule(Long roleId);

    void deleteByRoleMenuFunction(RoleMenuFunctionDO roleMenuFunctionDO);

    List<RoleMenuFunctionDO> queryPermisionByRoleFunction(@Param("roleList") List<Long> roleList
            , @Param("functionId") Long functionId);
}